class VehicleFormModel extends Backbone.Model
    url: '/mytable/getModel?s=table.creators.VehicleTable'
    initialize: (options) =>
        @fetch()
   
#--------------------------------------------------controler
class VehiclesApp
    search: =>
        myapp.mainRegion.close() 
        mymodel = new VehicleFormModel
        @layout = new ModelMainLayout(model: mymodel)
        myapp.mainRegion.show(@layout)

            

#--------------------------------------------------router
class VehiclesAppRouter extends Backbone.Marionette.AppRouter
    appRoutes: 
        "vehicles": "search"

                
myapp.addInitializer -> 
    myapp.Vehicles_app = new VehiclesApp()
    myapp.Vehicles_app.router = new VehiclesAppRouter controller: myapp.Vehicles_app

myapp.vent.trigger("routing:started")
